import React from 'react';
import { Table } from 'antd';
import style from './style.less';
console.log(style);

class HadRepaired extends React.Component {
    constructor() {
        super();
        this.state = {
            columns: [
                {
                    title: '序号',
                    dataIndex: 'index',
                    key:'index'
                },
                {
                    title: '缺陷名称',
                    dataIndex: 'defectName',
                    key: 'defectName'
                },
                {
                    title: '缺陷等级',
                    dataIndex: 'level',
                    key: 'level'
                },
                {
                    title: '缺陷位置',
                    dataIndex: 'position',
                    key: 'position'
                },
                {
                    title: '缺陷详情',
                    dataIndex: 'detail',
                    key: 'detail'
                },
                {
                    title: '缺陷录入时间',
                    dataIndex: 'time',
                    key: 'time'
                },
                {
                    title: '缺陷录入用户',
                    dataIndex: 'user',
                    key: 'user'
                },
                {
                    title: '纠正措施',
                    dataIndex: 'messure',
                    key: 'messure'
                },
                {
                    title: '责任区域',
                    dataIndex: 'responseArea',
                    key: 'responseArea'
                },
                {
                    title: '根本原因',
                    dataIndex: 'reason',
                    key: 'reason'
                },
                {
                    title: '返修站点',
                    dataIndex: 'site',
                    key: 'site'
                }


            ]
        }
    }

    render() {
        const dataConfig = this.props.dataConfig;
        return (
            <Table columns={this.state.columns} dataSource={dataConfig} scroll={{'x': 'true'}} className={style.myTable}></Table>
        )
    }
}

export default HadRepaired;